import request from '@/utils/request'

// ······························· 【活动分类---start】 ····································
// 活动分类-列表
export function getActivityType (params) {
  return request({
    url: '/activityType/getList',
    method: 'get',
    params:params
  })
}

// 活动分类-新增
export function addActivityType(data) {
  return request({
    url: '/activityType/add',
    method: 'post',
    data:data
  })
}

// 活动分类-修改
export function editActivityType(data) {
  return request({
    url: '/activityType/update',
    method: 'put',
    data: data
  })
}

// 活动分类-删除
export function delActivityType(data) {
  return request({
    url: '/activityType/delete',
    method: 'delete',
    data: data
  })
}
// ······························· 【活动分类---end】 ····································




// ······························· 【活动内容---start】 ····································
// 活动内容-列表
export function getActivity (params) {
  return request({
    url: '/activity/getList',
    method: 'get',
    params:params
  })
}

// 活动内容-新增
export function addActivity(data) {
  return request({
    url: '/activity/add',
    method: 'post',
    data:data
  })
}

// 活动内容-修改
export function editActivity(data) {
  return request({
    url: '/activity/update',
    method: 'put',
    data: data
  })
}

// 活动内容-删除
export function delActivity(data) {
  return request({
    url: '/activity/delete',
    method: 'delete',
    data: data
  })
}
// ······························· 【活动内容---end】 ····································




// ······························· 【活动商品---start】 ····································
// 活动商品SUB-id
export function getSubId (params) {
  return request({
    url: '/activity/getSnakeId',
    method: 'get',
    params:params
  })
}

// 活动商品-列表
export function getGoods (params) {
  return request({
    url: '/goods/getList',
    method: 'get',
    params:params
  })
}

// 活动商品-新增
export function addGoods(data) {
  return request({
    url: '/goods/add',
    method: 'post',
    data:data
  })
}

// 活动商品-修改
export function editGoods(data) {
  return request({
    url: '/goods/update',
    method: 'put',
    data: data
  })
}

// 活动商品-删除
export function delGoods(data) {
  return request({
    url: '/goods/delete',
    method: 'delete',
    data: data
  })
}

// 所有活动商品-列表
export function allGoods (params) {
  return request({
    url: '/goods/getAllData',
    method: 'get',
    params:params
  })
}
// ······························· 【活动商品---end】 ····································